<!-- userKey show page -->
<script id="show-userKey-table" type="text/html">
    <table class="layui-table" lay-skin="line row" style="margin:8px 20px 8px 20px;width:660px;">
        <thead>
        <tr>
            <th>userKey</th>
            <th>当前监控的场景服务器数量</th>
            <th>创建时间</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {{#  $.each(d, function(i, userSpace){ }}
        <tr>
            <td>{{ userSpace.userKey }}</td>
            <td>{{ userSpace.serverCount }}</td>
            <td>{{ userSpace.createTime }}</td>
            {{# if (userSpace.userKey == userKey) { }}
            <td><span class="layui-badge layui-bg-blue">当前使用</span></td>
            {{# } else {}}
            <td><button class="layui-btn layui-btn-danger layui-btn-sm change-user-key" id="{{ userSpace.userKey }}">切换</button></td>
            {{# } }}
        </tr>
        {{#  }); }}
        </tbody>
    </table>
</script>

<!--关于页面-->
<script id="rmp-about-page" type="text/html" render-html="true">
    <div class="rmp-about">
        <div class="rmp-about-content">
            <p>易大师资源监控平台  v1.1.0beta</p>
            <p>基于layui和JFinal开发的一款用于性能测试资源监控的工具</p>
            <p>Copyright @2017-2018</p>
        </div>
    </div>
</script>

<!--添加、更新。复制的表单模板 start-->
<script type="text/html" id="server-info-edit-tpl">
    <div class="rmp-serverInfo-edit-form layer-show-view">
        <form class="layui-form layui-form-pane" action="" lay-filter="server-info-form">
            <div class="layui-form-item">
                <label class="layui-form-label">类型</label>
                <div class="layui-input-block">
                    <select name="serverType" id="serverType" value="{{d.serverType || ''}}">
                        {{# $.each(d.serverTypes, function(type, name){ }}
                        <option value="{{type}}">{{name}}</option>
                        {{# }); }}
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">HOST</label>
                <div class="layui-input-block">
                    <input type="text" value="{{d.host || ''}}" name="host" id="host" required lay-verify="required" placeholder="IP地址" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">真实HOST</label>
                <div class="layui-input-block">
                    <input type="text" value="{{d.realHost || ''}}" name="realHost" id="realHost" autocomplete="off" class="layui-input" placeholder="如果使用了端口转发，请输入该服务器真实的IP地址">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">端口号</label>
                <div class="layui-input-block">
                    <input type="text" value="{{d.port || ''}}" name="port" id="port" placeholder="Linux默认为22可不填写,其他类型需要填写" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">用户名</label>
                <div class="layui-input-block">
                    <input type="text" value="{{d.username || ''}}" name="username" id="username" placeholder="没有则不填" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">密码</label>
                <div class="layui-input-block">
                    <input type="text" value="{{d.password || ''}}" name="password" id="password" placeholder="没有则不填" autocomplete="off" class="layui-input">
                </div>
            </div>
            <input type="hidden" name="createTime" id="createTime" value="{{d.createTime || ''}}"/>
            <input type="hidden" name="lastUseTime" id="lastUseTime" value="{{d.lastUseTime || ''}}"/>
            <input type="hidden" name="id" id="id" value="{{d.id || ''}}"/>
            <div class="layui-form-item">
                <label class="layui-form-label">标签</label>
                <div class="layui-input-block">
                    <input type="text" value="{{d.tags || ''}}" name="tags" id="tags" placeholder="使用空格区分" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <input type="button" id="server-info-setting-parameters" value="附加项设置" class="layui-btn layui-btn-normal"/>
            </div>
            <input type="hidden" name="parameters" id="parameters" value='{{d.parameters || ""}}'/>
            <div class="layui-form-item">
                <button class="layui-btn" lay-submit lay-filter="server-info-single-edit">提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </form>
    </div>
</script>
<!--添加、更新。复制的表单模板 end-->
<!--批量添加的模板 start-->
<script type="text/html" id="server-info-batch-add-tpl" render-html="true">
    <div class="layer-show-view">
        <form class="layui-form layui-form-pane" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">类型</label>
                <div class="layui-input-block">
                    <select name="serverType" id="serverType">
                        {{# $.each(serverInfos.serverTypes, function(type, name){ }}
                        <option value="{{type}}">{{name}}</option>
                        {{# }); }}
                    </select>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <textarea name="infos" required lay-verify="required" placeholder="host,realHost,port,username,password,tags,other..." class="layui-textarea" rows="5"></textarea>
            </div>
            <div class="layui-form-item">
                <button class="layui-btn" lay-submit lay-filter="server-info-batch-save">提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
            <div class="layui-form-item">
                <p id="batch-add-server-tip" style="color:#FF5722;">添加格式:登录IP,真实IP,端口,用户名,密码,标签,其他参数如下</p>
                {{# $.each(serverInfos.serverTypes, function(type, name){ }}
                <p><strong>{{name}}:</strong>
                    {{# $.each(serverInfos[type]['additionalParameters'], function(i, n){ }}
                    {{n.mark}},
                    {{# }); }}
                </p>
                {{# }); }}
                <p style="color:#FF5722;">相关说明：</p>
                <p>1、不需要填写或者留空的请不要省略[标签和附加参数可以批量省略];</p>
                <p>2、可以使用中文或者英文格式下的逗号[,或者，]作为分隔符;</p>
                <p>3、每次只能添加同类型的信息;</p>
            </div>
        </form>
    </div>
</script>
<!--批量添加的模板 end-->
<!--附加参数编辑页面模板 start-->
<script type="text/html" id="server-info-parameters-edit-tpl">
    <div class="rmp-serverInfo-edit-parameter">
        <form class="layui-form layui-form-pane" action="">
            {{# $.each(d.parameters, function(key, option){ }}
            <div class="layui-form-item">
                <label class="layui-form-label">{{ option.mark }}</label>
                <div class="layui-input-block">
                    <input type="text" placeholder="{{option.placeholder}}" name="{{key}}" id="{{key}}" autocomplete="off" class="layui-input" value="{{d.values[key] || option.value}}">
                </div>
            </div>
            {{# });}}
        </form>
    </div>
</script>
<!--附加参数编辑页面模板 end-->

<!--文件中服务器信息查看模板 start-->
<script type="text/html" id="report-file-server-infos-tpl">
    <div class="layer-show-view">
        <table class="layui-table" lay-filter="file-server-infos-table">
            <thead>
            <tr>
                <th lay-data="{field:'host',sort:true,minWidth:165}">HOST</th>
                <th lay-data="{field:'serverType',sort:true}">类型</th>
                <th lay-data="{field:'tags',sort:true}">标签</th>
                <th lay-data="{field:'startTime',sort:true,width:200}">监控开启时间</th>
                <th lay-data="{field:'lastTime',sort:true,width:200}">监控结束时间</th>
                <th lay-data="{field:'count',sort:true}">信息数量</th>
            </tr>
            </thead>
            <tbody>
            {{# $.each(d, function(i, info){ }}
            <tr>
                <td>{{ (info.realHost || info.host) + ':' + info.port }}</td>
                <td>{{ info.serverType }}</td>
                <td>{{ info.tags || '' }}</td>
                <td>{{ info.startTime }}</td>
                <td>{{ info.lastTime }}</td>
                <td>{{ info.count }}</td>
            </tr>
            {{# }); }}
            </tbody>
        </table>
    </div>
</script>
<!--文件中服务器信息查看模板 end-->
<!--预警值设置页面模板 start-->
<script type="text/html" id="setting-alert-value-setting-tpl" render-html="true">
    <div>
        <fieldset class="layui-elem-field">
            <div class="layui-field-box">
                {{# $.each(serverInfos.viewTypes, function(type, name){ }}
                <button class="layui-btn layui-btn-sm" server-type="{{ type }}">{{ name }}</button>
                {{# }); }}
            </div>
        </fieldset>
    </div>
    <hr>
    <div id="alert-setting"> 
        {{# $.each(serverInfos.viewTypes, function(type, name){ }}
        <div server-type="{{ type }}">
            <form class="layui-form layui-form-pane rmp-setting-form" action="">
                {{# $.each(serverInfos[type]['alertSettingValue'], function(alertName, alertInfo){ }}
                <div class="layui-form-item">
                    <label class="layui-form-label">{{ serverInfos[type]['constant'][alertName] }} &nbsp;{{ alertInfo.mode }}</label>
                    <div class="layui-input-block">
                        <input type="text" name="{{ alertName }}" required  lay-verify="required|number" value="{{ alertInfo.value }}" autocomplete="off" class="layui-input">
                    </div>
                </div>
                {{# }); }}
                <input type="hidden" value="{{ type }}" name="serverType">
                <input type="hidden" value="alert" name="type">
                <div class="layui-form-item">
                    <button class="layui-btn" lay-submit lay-filter="update-setting">更新</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </form>
        </div>
        {{# }); }}
    </div>
</script>
<!--预警值设置页面模板 end-->

<!--表格显示区域模板 start-->
<script type="text/html" id="monitoring-content-table-tpl" render-html="true">
    {{# $.each(serverInfos.viewTypes, function(type, name){ }}
    <!-- {{name}}视图面板 start-->
    <div class="layui-colla-item" id="{{type}}">
        <h2 class="layui-colla-title"><strong>{{name}}</strong>&nbsp;&nbsp;&nbsp;
            <i class="layui-icon layui-anim layui-anim-rotate layui-anim-loop layui-colla-icon-refresh ">&#x1002;</i>
        </h2>
        <div class="layui-colla-content layui-show">
            <div style="margin-bottom: 10px;">
                <div class="layui-inline">
                    {{# $.each(serverInfos[type]['btnTool'], function(i, btn){ }}
                    <button class="layui-btn layui-btn-{{ btn.type }} layui-btn-{{ btn.size }} {{ btn.markClass || '' }}" id="{{ btn.id }}">{{ btn.text }}</button>
                    {{# }); }}
                </div>
            </div>
            <hr>
            <table class="layui-table" lay-skin="line row" >
                <thead>
                <tr>
                    <th><input type="checkbox"></th>
                    {{# $.each(serverInfos[type]['tableColumn'], function(i, n) { }}
                    <th>{{ n }}</th>
                    {{# }); }}
                </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
        </div>
    </div>
    <!-- {{name}}视图面板 end-->
    {{# }); }}
</script>
<!--表格显示区域模板 end-->
<!--列显示设置页面模板 start-->
<script type="text/html" id="monitoring-column-view-tpl" render-html="true">
    <div class="layer-show-view">
        <div id="rmp-monitoring-column-view-btns">
            {{# $.each(serverInfos.viewTypes, function(type, name){ }}
            <button class="layui-btn layui-btn-sm" server-type="{{ type }}">{{ name }}</button>
            {{# }); }}
        </div>
        <hr>
        <div class="layui-form">
            <div class="layui-form-item">
                <div class="layui-input-block" style="margin-left:0px;">
                    {{# $.each(serverInfos.viewTypes, function(type, name){ }}
                    <span server-type="{{ type }}" style="display: none;">
                    {{# $.each(serverInfos[type]['tableColumn'], function(index, columnName){ }}
                        <input type="checkbox" data-column="{{ index }}" title="{{ columnName.replace(/<br>/, '_') }}" server-type="{{ type }}" lay-filter="rmp-column-view"/>
                    {{# }); }}
                    </span>
                    {{# }); }}
                </div>
            </div>
        </div>
    </div>
</script>
<!--列显示设置页面模板 end-->

<!--视图显示设置页面模板 start-->
<script type="text/html" id="monitoring-type-view-tpl">
    <div class="layer-show-view">
        <div class="layui-form">
            <div class="layui-form-item">
                <div class="layui-input-block" style="margin-left:0px;">
                    {{# $.each(d, function(type, visible){ }}
                    <input type="checkbox" title="{{ type }}" server-type="{{ type }}" lay-filter="rmp-type-view" {{ visible ? 'checked' : '' }}/>
                    {{# }); }}
                </div>
            </div>
        </div>
    </div>
</script>
<!--视图显示设置页面模板 end-->

<!--视图控制工具 start-->
<script type="text/html" id="monitoring-view-control-util-tpl" render-html="true">
    <div class="layer-show-view" id="view-control-util-page">
        <div class="layui-form-item">
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <select>
                        <option value="">请选择需要操作的服务器类型</option>
                        {{# $.each(serverInfos.viewTypes, function(type, name){ }}
                        <option value="{{ type }}" selected>{{ name }}</option>
                        {{# }); }}
                    </select>
                </div>
                <div class="layui-btn-container" style="margin-left: 320px;">
                    <button class="layui-btn" >停止刷新</button>
                    <button class="layui-btn">开始刷新</button>
                    <button class="layui-btn">清除缓存</button>
                    <button class="layui-btn">保存数据</button>
					<button class="layui-btn">删除表格</button>
                </div>
            </div>
        </div>
        <hr>
        <div id="tips">

        </div>
    </div>
</script>
<!--视图控制工具 end-->

<!--预警信息查看模板 start-->
<script type="text/html" id="monitoring-alert-info-view-tpl">
    <div class="layer-show-view" id="rmp-monitoring-alert-info-table">
        <table class="layui-table" lay-size="sm" lay-filter="alert-infos">
            <thead>
            <tr>
                <th>#</th>
                <th>IP</th>
                <th>类型</th>
                <th>标签</th>
                <th>类目</th>
                <th>名称</th>
                <th>当前值</th>
                <th>预警值</th>
                <th>时间</th>
            </tr>
            </thead>
            <tbody>
            {{# $.each(d, function(i, info){ }}
            <tr>
                <td>{{ info.viewId }}</td>
                <td>{{ info.host }}</td>
                <td>{{ info.serverType }}</td>
                <td>{{ info.tags }}</td>
                <td>{{ info.itemName }}</td>
                <td>{{ info.itemName2 }}</td>
                <td>{{ info.currentValue }}</td>
                <td>{{ info.alertValue }}</td>
                <td>{{ info.time }}</td>
            </tr>
            {{# }); }}
            </tbody>
        </table>
    </div>
</script>
<!--预警信息查看模板 end-->

<!--报告数据分析页面 start-->
<script type="text/html" id="rmp-report-history-analyze" render-html="true">
    <div class="layer-show-view">
        <div class="rmp-report-echarts-setting">
            <div class="layui-form layui-form-pane" action="">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width: 80px;">类型</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <select lay-filter="analyze-server-type" id="analyze-server-type">
                                <option value="">选择要查看的服务器类型</option>
                                {{# $.each(serverInfos.viewTypes, function(type, name){ }}
                                <option value="{{ type }}">{{ name }}</option>
                                {{# }); }}
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width: 80px;">服务器</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <div id="analyze-server-list">
                            </div>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label" style="width: 80px;">类目</label>
                        <div class="layui-input-inline" style="width: 200px;">
                            <div id="analyze-item-name">
                            </div>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button class="layui-btn layui-btn-lightgreen" id="analyze-view-submit">更新视图</button>
                    </div>
                </div>
            </div>
        </div>
        <hr>
        <div class="rmp-report-echarts-view" id="rmp-report-echarts-view">
            抱歉,尚未完成!
        </div>
    </div>
</script>
<!--报告数据分析页面 end-->

<!--导出excel设定模板 start-->
<script id="rmp-report-history-export-setting" type="text/html">
    <div class="layer-show-view">
       <div class="layui-form-item" style="margin-bottom: 0px;">
           <div class="layui-inline">
               <div class="layui-input-inline">
                   <select id="export-setting-kind">
                       <option value="">请选择需要类别</option>
                       <option value="avg" selected>平均值</option>
                       <option value="max">最大值</option>
                       <option value="min">最小值</option>
                   </select>
               </div>
               <div class="layui-btn-container" style="margin-left: 220px;">
                   <button class="layui-btn layui-btn-normal layui-btn-small" id="send-export-request">确定导出</button>
               </div>
           </div>
        </div>
        <hr>
        <div class="layui-collapse">
            {{# $.each(d,function(serverType, thisServerList) { }}
            <div class="layui-colla-item">
                <h2 class="layui-colla-title">{{ serverType }}服务器列表</h2>
                <div class="layui-colla-content">
                    <div class="layui-form">
                        <div class="layui-form-item">
                            <label class="layui-form-label">选择要分析的服务器</label>
                            <div class="layui-input-block">
                                <input type="checkbox" title="全选" lay-filter="all-checked">
                                {{# $.each(thisServerList, function(i, n) { }}
                                {{# var host = (n.realHost == null || n.realHost == '' ? n.host : n.realHost) + ':' + n.port; }}
                                <input type="checkbox" title="{{ host }}" data-id="{{ n.viewId }}" data-type="{{ serverType }}" class="export-setting-server">
                                {{# }); }}
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">选择要分析的类目</label>
                            <div class="layui-input-block">
                                <input type="checkbox" title="全选" lay-filter="all-checked">
                                {{# $.each(serverInfos[serverType]["propertyObject"], function(itemName1, mark1) { }}
                                {{# $.each(mark1, function(itemName2, mark2) { var itemName = itemName1 + "." + itemName2;var mark = serverInfos[serverType]['constant'][itemName2];}}
                                {{# if (mark != undefined) { }}
                                <input type="checkbox" title="{{ mark }}" data-value="{{ itemName }}" data-type="{{ serverType }}" class="export-setting-item">
                                {{# }; }}
                                {{# });}}
                                {{# }); }}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            {{# }); }}
        </div>
    </div>
</script>
<!--导出excel设定模板 end-->

<!-- linux监控jvm设置页面 start -->
<script id="rmp-monitoring-linux-jvm" type="text/html">
	<div class="layer-show-view">
		<form class="layui-form layui-form-pane" id="linux-jps-form" action="">
			<div class="layui-form-item">
			    <label class="layui-form-label">JAVA_HOME</label>
			    <div class="layui-input-block">
			      <input type="text" name="javaHome" id="javaHome" value="{{d.javaHome}}" placeholder="指定java_home" autocomplete="off" class="layui-input">
			    </div>
		  	</div>
		  	<div class="layui-form-item">
			    <label class="layui-form-label">JAVA_PROCESS_PID</label>
			    <div class="layui-input-block">
			      <input type="text" name="pid" id="pid" placeholder="指定一个需要监控的java进程的pid" autocomplete="off" class="layui-input">
			    </div>
		  	</div>
		  	<div class="layui-form-item">
			    <label class="layui-form-label">PROCESS_NAME</label>
			    <div class="layui-input-block">
			      <input type="text" name="processName" id="processName" placeholder="指定该进程的说明名称方便区分" autocomplete="off" class="layui-input">
			    </div>
		  	</div>
		  	<div class="layui-form-item layui-form-text">
		      <textarea id="processNames" class="layui-textarea" rows="6">{{d.processes}}</textarea>
		 	</div>
		 	<input type="hidden" id="viewId" value="{{d.viewId}}"/>
		 	<div class="layui-form-item">
		      <input type="button" class="layui-btn layui-btn-normal" id="rmp-monitoring-linux-check-jps" value="检查java进程列表"/>
		      <input type="button" class="layui-btn layui-btn-warning" id="rmp-monitoring-linux-add-jvm" value="启动jvm监控"/>
		  </div>
		</form>
	</div>
</script>
<!-- linux监控jvm设置页面 end -->

<!-- 控制台 -->
<script id="rmp-monitoring-server-console" type="text/html">
<div class="layer-show-view">
	<div class="layui-form layui-form-pane">
		<div class="layui-form-item">
		    <label class="layui-form-label">服务器列表</label>
		    <div class="layui-input-block">
		      <select id="rmp-console-server" lay-filter="rmp-console-server">
		        <option value="">请选择一个服务器</option>
		        {{# $.each(d.infoData, function(viewId, info){ }}
		        	<option value="{{ viewId }}">{{ '[' + serverInfos['viewTypes'][d.serverType] + ']' + info.host }}</option>
		        {{# }); }}
		      </select>
		    </div>
		  </div>
		<div class="layui-form-item">
		  <div class="layui-inline">
		    <label class="layui-form-label">执行命令</label>
		    <div class="layui-input-inline" style="width: 300px;">
		      <input type="text" name="rmp-console-command" id="rmp-console-command" placeholder="输入执行命令" autocomplete="off" class="layui-input">
		    </div>
		  </div>	  
		   <input type="button" class="layui-btn layui-btn-normal" value="执行" id="rmp-console-send-command-btn">&nbsp;
		   <input type="button" class="layui-btn layui-btn-danger" value="中断" id="rmp-console-break-command-btn">
		   <input type="hidden" id="rmp-console-command-tag"/>
		   <input type="hidden" id="rmp-console-server-type" value="{{ d.serverType }}"/>
		</div>  			  			  
		<div id="rmp-exec-return-info">
			<div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">执行结果</label>
			    <div class="layui-input-block">
			      <textarea id="rmp-console-renturn-info" class="layui-textarea" style="height: 250px;" readonly="readonly" ></textarea>
			    </div>
			  </div>
		</div>
	<div id="rmp-console-command-tips">
	
	</div>
	</div>
</div>
</script>
<!-- 控制台 -->

<!-- dataApi.html 数据选择界面 -->
<script id="rmp-dataapi-choose-server-panel" type="text/html">
  	<div class="layui-field-box">
		<div id="rmp-monitoring-column-view-btns">
            {{# $.each(serverInfos.viewTypes, function(type, name){ }}
            <button class="layui-btn layui-btn-sm" server-type="{{ type }}">{{ name }}</button>
            {{# }); }}
        </div>
        <hr>
        <div class="layui-form">
            <div class="layui-form-item">
                <div class="layui-input-block" style="margin-left:0px;" id="server-li">
                    {{# $.each(serverInfos.viewTypes, function(type, name){ }}
                    {{# $.each(d.serverList[type], function(index, info){ }}
					{{# d.analyzeDataObject[info.viewId + ''] =  info.apiData;}}
                        <button view-id="{{ info.viewId }}"  server-type="{{ type }}" style="display: none;" class="layui-btn layui-btn-sm layui-btn-primary choose-server">{{ serverInfos.viewTypes[type] + '-' + info.host + ':' + info.port + ' [' + (info.tags || '') + ']' }}</button>
                    {{# }); }}
                    {{# }); }}
                </div>
            </div>
        </div>
  	</div>
</script>
<!-- dataApi.html 数据选择界面 -->

<!-- dataApi.html 设置资源数据默认值 -->
<script id="rmp-dataapi-setting-default-data" type="text/html">
<div class="layer-show-view">
    <div id="rmp-apidata-setting-api-data-btns">
        <button class="layui-btn layui-btn-sm" resource-type="applicationResources">应用主机资源</button>
        <button class="layui-btn layui-btn-sm" resource-type="databaseResources">数据库资源</button>
        <button class="layui-btn layui-btn-sm" resource-type="clusterResources">集群主机资源</button>
    </div>
    <hr>
    <form class="layui-form layui-form-pane">
	    {{# $.each(d, function(type, info){ }}
	    {{# $.each(info, function(key, value){ }}
	      	<div class="layui-form-item" resource-type="{{ type }}">
	            <label class="layui-form-label">{{ value.mark }} [{{ key }}]</label>
	            <div class="layui-input-block">
	                <input type="text" value="{{ value.value }}" name="{{ key }}" autocomplete="off" class="layui-input" placeholder="{{ value.sign || '' }}">
	            </div>
	        </div>  
	    {{# }); }}
	    {{# }); }}
	    <div class="layui-form-item">
			<input type="hidden" id="update-default-api-data-flag" >
			<input type="hidden" id="count-id">
            <button class="layui-btn" lay-submit lay-filter="update-default-api-data">更新</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
			<a id="del-choose-server-data" class="layui-btn layui-btn-danger" href="javascript:;">删除此项</a>
        </div>
    </form>
</div>
</script>
<!-- dataApi.html 设置资源数据默认值 -->

<!-- dataApi.html 设置对接地址和需求标识 -->
<script id="rmp-dataapi-setting-api-url" type="text/html">
<div class="layer-show-view">
<form class="layui-form layui-form-pane">
    <div class="layui-form-item">
        <label class="layui-form-label">需求标识</label>
        <div class="layui-input-block">
            <input type="text" value="{{ d.apiIdentity  }}" name="apiIdentity" autocomplete="off" class="layui-input">
        </div>
    </div>
	<div class="layui-form-item">
        <label class="layui-form-label">需求名称</label>
        <div class="layui-input-block">
            <input type="text" value="{{ d.apiName  }}" name="apiName" autocomplete="off" class="layui-input">
        </div>
    </div>  
	<div class="layui-form-item">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <input type="text" value="{{ d.mark  }}" name="mark" autocomplete="off" class="layui-input">
        </div>
    </div>
 	<div class="layui-form-item">
         <button class="layui-btn" lay-submit lay-filter="update-api-url">更新</button>
     </div>
 </form>
 </div>
</script>
<!-- dataApi.html 设置对接地址和需求标识 -->
<!-- dataApi.html 查询历史对接记录 -->
<script type="text/html" id="rmp-dataapi-api-data-history">
    <div class="layer-show-view">
        <table class="layui-table" lay-filter="api-data-history">
            <thead>
            <tr>
				<th lay-data="{field:'id'}">ID</th>
                <th lay-data="{field:'apiData'}">分析数据</th>			
                <th lay-data="{field:'apiIdentity', sort:true}">需求标识</th>
                <th lay-data="{field:'apiName', sort:true}">需求名称</th>
                <th lay-data="{field:'saveTime', sort:true}">保存时间</th>
				<th lay-data="{field:'mark'}">需求备注</th>
				<th lay-data="{toolbar: '#apiDataHistoryBar'}">操作</th>
            </tr>
            </thead>
            <tbody>
            {{# $.each(d, function(i, info){ }}
            <tr>
				<td>{{ info.id || '' }}</td>
                <td>{{ info.apiData || '' }}</td>
                <td>{{ info.apiIdentity || '' }}</td>
                <td>{{ info.apiName || '' }}</td>
                <td>{{ info.saveTime || '' }}</td>
				<td>{{ info.mark || '' }}</td>
				<td></td>
            </tr>
            {{# }); }}
            </tbody>
        </table>
    </div>
</script>
<!-- dataApi.html 查询历史对接记录 -->
<!-- dataApi.html 指定历史记录文件ID和选择时间 -->
<script type="text/html" id="rmp-dataapi-setting-file-tpl" render-html="true">
<div class="layer-show-view">
<form class="layui-form layui-form-pane">
	<div class="layui-form-item">
       <label class="layui-form-label">历史记录文件ID</label>
       <div class="layui-input-block">
           <input type="text" name="fileId" autocomplete="off" class="layui-input" placeholder="你可以在报表记录模块查询" lay-verify="required|number">
       </div>
   	</div> 
   	<div class="layui-form-item layui-hide">
       <label class="layui-form-label">时间截取</label>
       <div class="layui-input-block">
           <input type="text" name="time" autocomplete="off" class="layui-input">
       </div>
   	</div> 
	<div class="layui-form-item">
        <button class="layui-btn" lay-submit lay-filter="setting-file-time">查询历史记录</button>
		<a class="layui-btn layui-btn-primary" href="javascript:;" id="reset-file-time">重置</a>
    </div>
</form>
</div>
</script>
<!-- dataApi.html 指定历史记录文件ID和选择时间 -->